﻿using UnityEngine;
using UnityEditor;
using System;
using Sirenix.OdinInspector;
using System.Collections.Generic;

[Serializable]
public class BulletTriggerData: MyScriptableObject
{

    //############技能伤害触发方式(状态机)
    //技能触发方式 0.帧数 1命中目标
    [ValueDropdown("BulletTriggerModeEnum")]
    [LabelText("触发方式")]
    public int triggerMode;
    //技能触发帧数： 
    [HideIf("@this.triggerMode == 1")]
    [LabelText("触发帧数")]
    public int triggerFrame;
    //技能范围 0.单体 1.形状区域
    [ValueDropdown("BulletTriggerRangeEnum")]
    [LabelText("技能范围")]
    public int triggerRange;
    //是否溅射（单体）
    [LabelText("是否溅射")]
    [HideIf("@this.triggerRange != 0")]
    public bool isSputtering;
    //单次攻击结束后是否触发重新选择目标
    [LabelText("单次结束是否重新选择目标")]
    public bool triggetTargetReSelect;
    //能否打断动作 0.不能打断当前动作 1.打断当前动作
    [ValueDropdown("SkillSiteTargetHitBreakTypeCampEnum")]
    [LabelText("能否打断目标动作")]
    public int hitBreakType;
    [ValueDropdown("SkillSiteTargetSelectCampEnum")]
    //形状区域伤害单位类型0.我方 1.敌方 2.混合
    [LabelText("作用目标类型")]
    [HideIf("@this.triggerRange != 1")]
    public int triggerCamp;
    //附加的BUFFID
    [LabelText("附加的Buffer")]
    public BuffData[] buffs;


#if UNITY_EDITOR
    private List<ValueDropdownItem<int>> BulletTriggerModeEnum = new ValueDropdownList<int>()
    {
      { "帧数", 0 },
      { "命中目标", 1 },
    };

    private List<ValueDropdownItem<int>> BulletTriggerRangeEnum = new ValueDropdownList<int>()
    {
      { "单体(使用初始作用目标)", 0 },
      { "形状区域", 1 },
    };

    private List<ValueDropdownItem<int>> SkillSiteTargetSelectCampEnum = new ValueDropdownList<int>()
    {
      { "我方", 0 },
      { "敌方", 1 },
      { "混合", 2 },
    };

    private List<ValueDropdownItem<int>> SkillSiteTargetHitBreakTypeCampEnum = new ValueDropdownList<int>()
    {
      { "不能打断", 0 },
      { "打断", 1 },
    };
#endif
}